// MCPanel.cpp : implementation file
//

#include "stdafx.h"
#include "MotionControlSoftware.h"
#include "MCPane.h"


// CMCPane

IMPLEMENT_DYNAMIC(CMCPane, CDockablePane)

CMCPane::CMCPane()
{

}

CMCPane::~CMCPane()
{
}


BEGIN_MESSAGE_MAP(CMCPane, CDockablePane)
	ON_WM_CREATE()
	ON_WM_DESTROY()
	ON_WM_SIZE()
	ON_WM_CONTEXTMENU()
END_MESSAGE_MAP()



// CMCPane message handlers




int CMCPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CDockablePane::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO:  Add your specialized creation code here
	m_DlgMC.Create(IDD_DLG_MotionControl,this);
	m_DlgMC.ShowWindow(SW_SHOW);
	return 0;
}


void CMCPane::OnDestroy()
{
	CDockablePane::OnDestroy();
	// TODO: Add your message handler code here
	m_DlgMC.DestroyWindow();
}


void CMCPane::OnSize(UINT nType, int cx, int cy)
{
	CDockablePane::OnSize(nType, cx, cy);

	// TODO: Add your message handler code here
	if (m_DlgMC.GetSafeHwnd())
	{
		CRect rct;
		GetClientRect(rct);
		m_DlgMC.MoveWindow(rct);
	}
}


void CMCPane::OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/)
{
	// TODO: Add your message handler code here
}
